package day1;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.StringTokenizer;

public class Settest {
	public static void main(String[] args) {
		
		
		String string = new String("AB,CD");
		
		StringTokenizer tokenizer = new StringTokenizer(string, ",");
		String[] labels = null;
		String string2 = null;
		while (tokenizer.hasMoreElements()) {
			// parse each integer in file
			for (int i = 1; tokenizer.hasMoreElements(); i++) {
				if (i == 1) {
					string2 = tokenizer.nextToken().trim();
				} else{
					String nextToken = tokenizer.nextToken();
					labels = nextToken.split(" && ");
				}
				if (labels != null)
					System.out.println(string2 + Arrays.asList(labels));
				else 
					System.out.println(string2);
			}
		}
		
	}
}
